const express = require('express')
const router = express.Router()

const timeLog = (req, res, next) => {
  console.log('Time: ', new Date().toLocaleTimeString())
  next()
}

router.use(timeLog)

router.get('/', (req, res) => {
  res.send('route hello world')
})

router.get('/about', (req, res) => {
  res.send('route about')
})

module.exports = router
